# -*- coding: utf-8 -*-
import wsgiref.handlers
from google.appengine.ext import webapp
import sys, time, uuid
import os
from google.appengine.ext.webapp import template
from google.appengine.ext import db
from xmw_lib_py import tianya

class MainPage(webapp.RequestHandler):
  def get(self):
    if  self.request.GET.has_key('thread_id'):
        thread_id=self.request.GET['thread_id']
        self.response.out.write(html)
        
    else:
        template_values = {
            'code': 10005,
            'reason': "parameter not specified:url"
        }
        path = os.path.join(os.path.dirname(__file__), 'template/error.html')
        #self.response.out.write(path)
        self.response.out.write(template.render(path, template_values))

def main():
    
    application = webapp.WSGIApplication(
                                       [('/list_thread_page', MainPage)],
                                       debug=True)                                       
    wsgiref.handlers.CGIHandler().run(application)

if __name__ == "__main__":
    main()
    
